import { createRouter, createWebHistory } from 'vue-router'
import HomeLive from '../views/HomeLive.vue'

const routes = [
  // 首页
  {
    path: '/',
    name: 'home',
    component: HomeLive
  },
  // 赛事
  {
    path: '/match',
    name: 'match',
    component: () => import('../views/HomeMatch.vue')
  },
  // 关注
  {
    path: '/attent',
    name: 'attent',
    component: () => import('../views/HomeAttent.vue')
  },
  // 资讯-视频
  {
    path: '/infovideo',
    name: 'infovideo',
    component: () => import('../views/InfoVideo.vue')
  },
  // 资讯-视频-分类
  {
    path: '/videoclass',
    name: 'videoclass',
    component: () => import('../views/VideoClass.vue')
  },
  // 资讯-新闻
  {
    path: '/infonew',
    name: 'infonew',
    component: () => import('../views/InfoNew.vue')
  },
  // 资讯
  {
    path: '/info',
    name: 'info',
    component: () => import('../views/HomeInfo.vue')
  },
  // 资讯-社区
  {
    path: '/detailsinfo',
    name: 'detailsinfo',
    component: () => import('../views/DetailsInfo.vue')
  },
  // 资讯-社区-发布帖子
  {
    path: '/sentinfo',
    name: 'sentinfo',
    component: () => import('../views/SentInfo.vue')
  },
  // 个人中心
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/HomeMy.vue')
  },
  // 修改个人信息
  {
    path: '/mychangeinfo',
    name: 'mychangeinfo',
    component: () => import('../views/MyChangeinfo.vue')
  },
  // 购买
  {
    path: '/mybuy',
    name: 'mybuy',
    component: () => import('../views/MyBuy.vue')
  },
  // 我的背包
  {
    path: '/mybag',
    name: 'mybag',
    component: () => import('../views/MyBag.vue')
  },
  
  // 抽奖
  {
    path: '/myluckydraw',
    name: 'myluckydraw',
    component: () => import('../views/MyLuckydraw.vue')
  },
  // 任务中心
  {
    path: '/mymissioncenter',
    name: 'mymissioncenter',
    component: () => import('../views/MyMissionCenter.vue')
  },
  
  // 反馈
  {
    path: '/myadvertis',
    name: 'myadvertis',
    component: () => import('../views/MyAdvertis.vue')
  },
  // 反馈
  {
    path: '/myfeedback',
    name: 'myfeedback',
    component: () => import('../views/MyFeedback.vue')
  },
  // 反馈内容
  {
    path: '/myfeedbackinfo',
    name: 'myfeedbackinfo',
    component: () => import('../views/MyFeedbackinfo.vue')
  },
  // 搜索
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/SearchContent.vue')
  },
  // 直播详情
  {
    path: '/detailslive',
    name: 'detailslive',
    component: () => import('../views/DetailsLive.vue')
  },
  // 文章详情
  {
    path: '/detailsnew',
    name: 'detailsnew',
    component: () => import('../views/DetailsNew.vue')
  },
   // 主播详情
   {
    path: '/detailshost',
    name: 'detailshost',
    component: () => import('../views/DetailsHost.vue')
  },
  // 视频详情
  {
    path: '/detailsvideo',
    name: 'detailsvideo',
    component: () => import('../views/DetailsVideo.vue')
  },
  // 比赛详情
  {
    path: '/detailsmatch',
    name: 'detailsmatch',
    component: () => import('../views/DetailsMatch.vue')
  },
  // 登录
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/RegisterView.vue')
  },
  // 密码登录
  {
    path: '/loginpsw',
    name: 'loginpsw',
    component: () => import('../views/LoginPsw.vue')
  }
  ,
  // 忘记密码
  {
    path: '/forgotpsw',
    name: 'forgotpsw',
    component: () => import('../views/ForgotPsw.vue')
  },
  // 重置密码
  {
    path: '/pswreset',
    name: 'pswreset',
    component: () => import('../views/PswReset.vue')
  },
  //直播聊天
  {
    path: '/chat',
    name: 'chat',
    component: () => import('../views/ChatView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
  scrollBehavior() {
    return {
      x: 0,
      y: 0
    }
  }
})

export default router
